﻿using AntdUI;
using CKS.Core.Framework;
using Microsoft.AspNetCore.Mvc;
using Microsoft.IdentityModel.Tokens;
using S7.Net;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZR.Admin.WebApi.Filters;
using ZR.Model.Dto.Business.ProductionControl;
using ZR.Model.Models.ProductionControl;
using ZR.Repository;
using ZR.Service.IService.ProductionControl;
using ZR.Service.Service.ProductionControl;

namespace CKS.MES.Server.Controllers.Business.ProductionControl
{
    /// <summary>
    /// 报警记录
    /// </summary>
    //[Verify]
    [Route("business/CksAlarmRecord")]
    [ApiExplorerSettings(GroupName = "business")]
    public class CksAlarmRecordController : BaseController
    {
        /// <summary>
        /// 报警记录接口
        /// </summary>
        private readonly ICksAlarmRecordService _cksAlarmRecordService;

        public CksAlarmRecordController(ICksAlarmRecordService cksAlarmRecordService)
        {
            _cksAlarmRecordService = cksAlarmRecordService;
        }

        /// <summary>
        /// 查询报警记录
        /// </summary>
        /// <param name="parm"></param>
        /// <returns></returns>
        [HttpGet("list")]
        [AllowAnonymous]
        [ActionPermissionFilter(Permission = "alarm:cksalarmrecord:list")]
        public IActionResult QueryCksAlarmRecord([FromQuery] CksAlarmRecordQueryDto parm)
        {
            var response = _cksAlarmRecordService.GetList(parm);
            return SUCCESS(response);
        }


    }

}
